package com.study.custom.mybatis;

import java.io.IOException;
import java.io.InputStream;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/12/23 21:00
 */
public class Resources {
    public static InputStream getResourceAsStream(String resource) throws IOException {
        ClassLoader loader = Resources.class.getClassLoader();
        InputStream in = loader.getResourceAsStream(resource);
        if (in == null) {
            throw new IOException("Could not find resource " + resource);
        }
        return in;
    }
}
